package csc.fresher.service;

import java.sql.Timestamp;
import java.util.List;

import csc.fresher.entity.Transaction;
import csc.fresher.entity.TransactionState;
import csc.fresher.entity.TransactionType;

public interface TransactionService {
	public long createTransaction(double funds, TransactionType transactionType,
			long savingAccountNumber, long systemUserID);

	public boolean approveTransactionState(long transactionID, long accoutNumberID, long systemUserID);
	
	public boolean denyTransactionState(long transactionID, long accoutNumberID, long systemUserID);

	
	public List<Transaction> getListTransactionAccountInAPeriod(
			long accountNumberID, Timestamp begin, Timestamp end,
			int startIndex, int maxReturn);
	
	public List<Transaction> getListSavingTransactionByAccountNumber(long accountNumber);

	public List<Transaction> getListTransactionAccountInAPeriodByType(
			long accountNumberID, Timestamp begin, Timestamp end,
			TransactionType transactionType, int startIndex, int maxReturn);

	public List<Transaction> getListTransactionAccountInAPeriodByState(
			long accountNumberID, Timestamp begin, Timestamp end,
			TransactionState transactionState, int startIndex, int maxReturn);

	/**
	 * {@inheritDoc}
	 * 
	 * Get table saving account has interest rate
	 * 
	 * @param accountNumberID
	 * @param startIndex
	 * @param maxReturn
	 * @return
	 */
	public List<Transaction> getListInterestRateOfUser(long accountNumberID,
			int startIndex, int maxReturn);
}
